package com.auto.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import com.auto.bean.Yellow;
//@PropertySources()
@Configuration
// @PropertySource(value = "classpath:/com/auto/abc.properties")
@ComponentScan("com.auto")
public class MyAuto {

//	@Profile("test")
	@Bean(name = "yellow01")
	public Yellow yellow01() {
		return new Yellow();
	}
	
	@Bean(name = "yellow02")
	public Yellow yellow02() {
		return new Yellow();
	}
	
	
	// String name;

	// @Value("${person.nickName}")

	// @Primary
	// @Bean
	// public BookDao bookDao2() {
	// BookDao bookDao = new BookDao();
	// bookDao.setName("2");
	// System.out.println("MyAuto.bookDao2(111)");
	// System.out.println(name);
	// return bookDao;
	// }

	// @Bean
	// public Person person(BookDao bookDao) {
	// Person person = new Person();
	// person.setBook(bookDao);
	// System.out.println(person);
	// return person;
	// }
}
